package ${domain}.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ${domain}.frame.auth.LocalData;
import ${domain}.frame.auth.Token;

import javax.annotation.PostConstruct;

@Configuration
public class TestConfig {

    @Autowired
    private ApplicationContext applicationContext;

    @PostConstruct
    public void initLocalData() {
        LocalData.init(applicationContext,new String[]{});
    }

    @Bean
    public Token getTestToken() {
        Token token = new Token();
        token.setId(0);
        token.setUserId(0);
        token.setUserName("wsys");
        return token;
    }
}